﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Unity;
using NetManager.Core.Services;
using NetManager.LocalBrowser.Services;
using Microsoft.Practices.Composite.Regions;
using NetManager.Core;
using NetManager.LocalBrowser.Views;
using NetManager.LocalBrowser.ViewModels;

namespace NetManager.LocalBrowser
{
    public class LocalBrowserModule : IModule
    {
        public LocalBrowserModule(IUnityContainer unityContainer, IRegionManager regionManager)
        {
            _unityContainer = unityContainer;
            _regionManager = regionManager;
        }

        public void Initialize()
        {
            RegisterTypes();
        }

        private void RegisterTypes()
        {
            _unityContainer.RegisterType<IContentService, LocalContentService>();
            _unityContainer.RegisterType<IContentModel, LocalContentViewModel>();
            _unityContainer.RegisterType<IContentViewer, LocalContentView>();
        }

        private IRegionManager _regionManager;
        private IUnityContainer _unityContainer;
    }
}
